﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace EzDesk.Core.Model
{

    [DataContract]
    public class AppFunctionType : IModel
    {
        [DataMember]
        public Guid Id
        {
            get;
            set;
        }

        /// <summary>
        /// 类型名称
        /// </summary>
        [DataMember]
        public string TypeName { get; set; }

        /// <summary>
        /// 显示字符串
        /// </summary>
        [DataMember]
        public string DisplayText
        {
            get;
            set;
        }

        /// <summary>
        /// 类型的图标地址
        /// </summary>
        [DataMember]
        public string IconUrl { get; set; }

        public string IconName { get; set; }

        /// <summary>
        /// 用于显示的优先级
        /// </summary>
        [DataMember]
        public int Privilege { get; set; }

    }

    public class AppFunctionTypeComparint : IEqualityComparer<AppFunctionType>
    {

        public bool Equals(AppFunctionType x, AppFunctionType y)
        {
            return x.Id == y.Id;
        }

        public int GetHashCode(AppFunctionType obj)
        {
            return obj.Id.GetHashCode();
        }
    }
}
